
package org.bridgen.lang.semantics.ast;
import java.util.*;


public class OneMultiPattern extends MatchPattern implements Cloneable {
    public void flushCache() {
        super.flushCache();
    }
     @SuppressWarnings({"unchecked", "cast"})  public OneMultiPattern clone() throws CloneNotSupportedException {
        OneMultiPattern node = (OneMultiPattern)super.clone();
        node.in$Circle(false);
        node.is$Final(false);
    return node;
    }
     @SuppressWarnings({"unchecked", "cast"})  public OneMultiPattern copy() {
      try {
          OneMultiPattern node = (OneMultiPattern)clone();
          if(children != null) node.children = (ASTNode[])children.clone();
          return node;
      } catch (CloneNotSupportedException e) {
      }
      System.err.println("Error: Could not clone node of type " + getClass().getName() + "!");
      return null;
    }
     @SuppressWarnings({"unchecked", "cast"})  public OneMultiPattern fullCopy() {
        OneMultiPattern res = (OneMultiPattern)copy();
        for(int i = 0; i < getNumChildNoTransform(); i++) {
          ASTNode node = getChildNoTransform(i);
          if(node != null) node = node.fullCopy();
          res.setChild(node, i);
        }
        return res;
    }
    // Declared in PrettyPrint.jrag at line 350

    
    public void pp(StringBuffer buf) {
    	getAltPattern().pp(buf);
    	buf.append("+");
    }

    // Declared in bridgit.ast at line 3
    // Declared in bridgit.ast line 59

    public OneMultiPattern() {
        super();


    }

    // Declared in bridgit.ast at line 10


    // Declared in bridgit.ast line 59
    public OneMultiPattern(AltPattern p0) {
        setChild(p0, 0);
    }

    // Declared in bridgit.ast at line 14


  protected int numChildren() {
    return 1;
  }

    // Declared in bridgit.ast at line 17

  public boolean mayHaveRewrite() { return false; }

    // Declared in bridgit.ast at line 2
    // Declared in bridgit.ast line 59
    public void setAltPattern(AltPattern node) {
        setChild(node, 0);
    }

    // Declared in bridgit.ast at line 5

    public AltPattern getAltPattern() {
        return (AltPattern)getChild(0);
    }

    // Declared in bridgit.ast at line 9


    public AltPattern getAltPatternNoTransform() {
        return (AltPattern)getChildNoTransform(0);
    }

    // Declared in TypeCodeGen.jrag at line 294
 @SuppressWarnings({"unchecked", "cast"})     public String value() {
        String value_value = value_compute();
        return value_value;
    }

    private String value_compute() {  return "(" + getAltPattern().value() + ")+";  }

    // Declared in TypeCodeGen.jrag at line 357
 @SuppressWarnings({"unchecked", "cast"})     public String regExp() {
        String regExp_value = regExp_compute();
        return regExp_value;
    }

    private String regExp_compute() {  return getAltPattern().regExp() + "+";  }

public ASTNode rewriteTo() {
    return super.rewriteTo();
}

}
